const { getApiSidebarList } = require('../api/config')
const path = require('path')

let sidebarList = {
  '/guide/': ['/guide/README.md'],
  '/help/': ['/help/README.md']
}

sidebarList = Object.assign({}, sidebarList, getApiSidebarList())
console.log('sidebarList', sidebarList)

module.exports = {
  lang: 'zh-CN',
  title: 'Event-Manager',
  description: '原生JavaScript，订阅、发布模式，事件触发接收管理类',
  themeConfig: {
    logo: '/assets/logo.png',
    // locales: {
    //   // 键名是该语言所属的子路径
    //   // 作为特例，默认语言可以使用 '/' 作为其路径。
    //   '/': {
    //     lang: 'en-US',
    //     title: 'VuePress',
    //     description: 'Vue-powered Static Site Generator',
    //   },
    //   '/zh/': {
    //     lang: 'zh-CN',
    //     title: 'VuePress',
    //     description: 'Vue 驱动的静态网站生成器',
    //   },
    // },
    sidebar: sidebarList,
    sidebarDepth: 10,
    navbar: [
      // NavbarItem
      {
        text: '首页',
        link: '/'
      },
      {
        text: '指南',
        link: '/guide/'
      },
      {
        text: 'API',
        link: '/api/'
      },
      {
        text: '常见问题',
        link: '/help/'
      },
      {
        text: 'GitHub',
        link: 'https://github.com'
      }
    ]
  },
  plugins: [
    [require('vuepress-plugin-vue-compdemo')],
    [
      '@vuepress/plugin-search',
      {
        locales: {
          '/': {
            placeholder: '搜索'
          }
        }
      }
    ]
  ]
}
